// VisualStudio.h
// VisualStudioApp.h : main header file for the VisualStudio application
//

#pragma once
#ifndef __AFXWIN_H__
#error "include 'stdafx.h' before including this file for PCH"
#endif
#include ".\Lang\Resource.h"       // main symbols

// CVisualStudioApp:
// See  for the implementation of this class
//

class CVisualStudioApp : public CWinApp,
	public saf::CComFramework,
	public IDispEventImpl<2, CVisualStudioApp, &saf::DIID__IComFrameworkEvents, &saf::LIBID_ArtFrameLib, -1, -1>
{
public:
	CVisualStudioApp();
	saf::IMainFrame* GetMainFrame() { return m_pMainFrame; }

	// Overrides
public:
	virtual BOOL InitInstance();

public: // com Event
	BEGIN_SINK_MAP(CVisualStudioApp)
		SINK_ENTRY_EX(/*nID =*/ 2, saf::DIID__IComFrameworkEvents, /*dispid =*/ ID_ComFramework_CloseMainFrame, &OnCloseMainFrame)
		SINK_ENTRY_EX(/*nID =*/ 2, saf::DIID__IComFrameworkEvents, /*dispid =*/ ID_ComFramework_Quit, &OnQuit)
	END_SINK_MAP()

	void __stdcall OnQuit(VARIANT_BOOL* bExit);
	void __stdcall OnCloseMainFrame(BSTR strKind, saf::IMainFrame* pMainFrame, VARIANT_BOOL *bExit);

protected:
	HRESULT CreateMDISplitterWnd(int nShowCmd);
	void CreateStatusBar();
	void CreateTools();
public:
	DECLARE_MESSAGE_MAP()
private:
	CComPtr<saf::IMainFrame>	m_pMainFrame;
	typedef saf::CComFramework safBaseClass;
};

extern CVisualStudioApp theApp;

#define  TITLE_LEFTCELL		L"LeftCell"